<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <link th:href="@{/lib/bootstrap/css/bootstrap.min.css}" type="text/css" rel="stylesheet"></link>
    <link th:href="@{/css/style.min.css}" type="text/css" rel="stylesheet"></link>
    <style>
        strong {
            font-size: 15px;
            margin-right: 10px;
            color: black;
        }
    </style>
    <script type="text/javascript">


        window.onload = function () {

            var code = document.getElementById("code").value;
            if (code == 401) {
                if (top.location.href != location.href) {
                    top.location.href = location.href;
                    return;
                }

                document.getElementById("submit").click();
            }
        }
    </script>


</head>
<body style="margin-top: 20px;">

<div class="container">
    <div class="row">
        <div class="panel panel-success">
            <div class="panel-heading"><strong class="text-danger">错误码: </strong> [[${code}]]
                <th:block th:if="${status}">[[${status}]]</th:block>
            </div>
            <div class="panel-body">
                <h3 class="text-info">错误信息：</h3>
                <p class="text-danger">
                    [[${msg}]]
                    <!--兼容BasicErrorController  默认的异常处理，比如 TemplateInputException 不会被全局异常捕捉处理的问题-->
                    <th:block th:if="${status}">
                        <strong>timestamp:</strong>[[${timestamp}]] <br/>
                        <strong>error:</strong>[[${error}]] <br/>
                        <strong>trace:</strong>[[${trace}]] <br/>
                    </th:block>


                </p>
            </div>
        </div>


        <div style="display:none">
            <input id="code" th:value="${code}"/>
            <form th:action="@{/}" method="post">
                <input type="hidden" name="flag" value="flag"/>
                <button id="submit" type="submit">login</button>
            </form>
        </div>


    </div>
</div>
<script th:src="@{/lib/jquery/jquery.min.js}"></script>
<script th:src="@{/lib/bootstrap/js/bootstrap.min.js}"></script>

</body>
</html>